function y = nonscomp(x)
% NONSCOMP function
% x0=3*ones(n,1);

n=length(x);
y=(x(1)-1)^2;
for i=2:n
    y=y+4*(x(i)-(x(i-1))^2)^2;
end


